package com.foreveross.fetl.common.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.ParentPackage;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.inject.Inject;

@ParentPackage("convention-default")
public abstract class BaseStrutsAction extends ActionSupport {
	/**
	 * log4j日志记录
	 */
	protected static Logger logger = Logger.getLogger(BaseStrutsAction.class);
	/** 
	 * @Fields serialVersionUID 
	 */ 
	private static final long serialVersionUID = -2352933873997140918L;

	@Inject("struts.multipart.saveDir")   
	protected String multipartSaveDir; 
	
	@Inject("struts.convention.result.path")   
	protected String resultPath; 
	
	@Inject("struts.action.extension")   
	protected String actionExtension;
	
	protected HttpServletRequest request;
	
	protected HttpServletResponse response;

	public BaseStrutsAction(){
		request = ServletActionContext.getRequest();
		response = ServletActionContext.getResponse();
	}
	public String getMultipartSaveDir() {
		return multipartSaveDir;
	}

	public void setMultipartSaveDir(String multipartSaveDir) {
		this.multipartSaveDir = multipartSaveDir;
	}

	public String getResultPath() {
		return resultPath;
	}

	public void setResultPath(String resultPath) {
		this.resultPath = resultPath;
	}


	public String getActionExtension() {
		return actionExtension;
	}

	public void setActionExtension(String actionExtension) {
		this.actionExtension = actionExtension;
	}
	
	
}
